﻿#ifndef WIDGET_H
#define WIDGET_H

#include "disposethread.h"
#include "scanruleservice.h"

#include <QStandardItemModel>
#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
public slots:
    void selectAll();
    void addScanRule();
    void upScanRule();
    void delScanRule();

public slots:
    void slot_workStatus(bool isRun);
    void slot_workMsg(QString msg);
private slots:
    void on_addRule_clicked();

    void on_tableView_customContextMenuRequested(const QPoint &pos);

    void on_switchBtn_clicked();

    void on_selScanDirBth_clicked();

    void on_scanDir_editingFinished();

private:
    Ui::Widget *ui;
    QStandardItemModel *tableModel;
    ScanRuleService objectService;

    bool disposeStatus;
    DisposeThread *disposeThread;
};
#endif // WIDGET_H
